<template>
  <div id="app">
    <a-locale-provider :locale="zh_CN">
      <router-view :key="(new Date()).getTime()" />
    </a-locale-provider>
  </div>
</template>

<script>
import zh_CN from 'ant-design-vue/lib/locale-provider/zh_CN';
import moment from 'moment';
import 'moment/locale/zh-cn';
moment.locale('zh-cn');
export default {
  name: 'App',

  data() {
    return {
      zh_CN,
      menus: [
        {
          key: "vue",
          route: "/",
          title: "主页"
        },
        {
          key: "vue-Menu",
          route: "/Menu",
          title: "列表页"
        },
        {
          key: "vue-communication",
          route: "/communication",
          title: "通讯页"
        },
        {
          key: "react",
          route: "/react",
          title: "React 子应用"
        }
      ]
    }
  },

  computed: {
    currentRoute() {
      const menu = this.menus.find(item => item.route === this.$route.path)
      return menu ? menu.key : "vue";
    }
  },
}
</script>

<style>
</style>
